extends CharacterBody2D

class_name Enemy
const SCORE = preload("res://scenes/score.tscn")

var speed = 50.0
var direction:int = -1
var dead_speed = 50

# Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")

func hurt():
	pass
func _physics_process(delta):
	velocity.x = direction * speed
	if not is_on_floor():
		velocity.y += gravity * delta
	move_and_slide()
